# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         less1_02
# Description:  课堂作业
# Author:       asus
# Date:         2019/3/13
#-------------------------------------------------------------------------------


# Student 类属性：姓名，年龄，专业，系，院，学校名称
# 来自 getinfo 方法构造一个漂亮的模板字符串

class Stu(object):
    def __init__(self,name,age,major,department,school):
        self.name = name
        self.age = age
        self.major = major
        self.department = department
        self.school = school

    def getinfo(self):
        return "{}，{}岁，来自{}{}{}".format(self.name, self.age, self.school, self.department, self.major)
if __name__ == '__main__':
    m = Stu('yzb',22,'xg','sy','hngydx)
    print(m.getinfo())
